package cn.usian.controller;

import cn.usian.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties(Person.class)
public class HelloController {
    @Autowired
    private Person person;
    @RequestMapping("/hello")
    public String hello(){
        return "你好，包迎春sb";
    }
    @GetMapping("/per")
    public String getPerson(){
        return person.toString();
    }
}
